DVLA Test Scenarios
Scenario 1: Regular endorsement
A regular endorsement refers to a penalty received for a driving license as a result of a DVLA check.
Penalty Code and assocuated periods
In this case, the system will consider the number of years to be added to the offense date to calculate the end date and removal date, based on the penalty code. Below are the penalty codes and their corresponding periods.
code : "SP30" endPeriod : 3 period: 4
Expected Outcomes:
Expected End Date: 01/03/2027 (Offense Date + 3 years)
Expected Removal Date: 01/03/2028 (Offense Date + 4 years)
Expected End Date: 05/12/2025 (Offense Date + 3 years)
Expected Removal Date: 05/12/2026 (Offense Date + 4 years)
Driver Details
endorsements: [
{
"penaltyPoints": 3,
"offenceCode": "SP30",
"offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
"offenceDate": "2024-03-01"
},
{
"penaltyPoints": 3,
"offenceCode": "SP30",
"offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
"offenceDate": "2022-12-05"
},
{
"penaltyPoints": 3,
"offenceCode": "SP30",
"offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
"offenceDate": "2021-08-23"
}
],
Scenario 2: End Date calculation on Offense date
When the driving license is not disqualified, the endorsement end date and removal date is calculated based on the offense date and the type of violation.
Driver Details:
- Name: Oliver D
- Driving License Number: TCAE276539786235
Penalty Code and assocuated periods
In this case, the system will consider the number of years to be added to the offense date to calculate the end date and removal date, based on the penalty code. Below are the penalty codes and their corresponding periods.
code : "SP30" endPeriod : 3 period: 4
Expected Outcome:
Expected End Date: 12/12/2025 (Offense Date + 3 years)
Expected Removal Date: 12/12/2026 (Offense Date + 4 years)
Expected End Date: 12/12/2025 (Offense Date + 3 years)
Expected Removal Date: 12/12/2026 (Offense Date + 4 years)
---- DVLA Api Response ----
endorsements: [
{
"penaltyPoints": 3,
"offenceCode": "SP30",
"offenceLegalLiteral":"Exceeding statutory speed limit on a public road",
"offenceDate": "2022-12-12",
},
]
---- End Date and Removal Date Calculation in Visn ----
Scenario 3: Endorsement End Date calculation on conviction date
When the driving license is disqualified, the endorsement end date and removal date is calculated based on the conviction date and the type of violation.
Driver Details:
- Name: Edward K
- Driving License Number: LQZVJ603206B99ZY
Penalty Code and assocuated periods
In this case, the system will consider the number of years to be added to the conviction date to calculate the end date and removal date, based on the penalty code. Below are the penalty codes and their corresponding periods.
code : "CD60" endPeriod : 10 period: 11
Expected Outcome:
Expected End Date: (Conviction Date + 10 years) = 05/12/2034
Expected Removal Date: (Conviction Date + 11 years) = 05/12/2035
Penalty Code: CD60
Penalty Points: 9
---- DVLA Api Response ----
endorsements: [
{
"offenceCode": "CD60",
"offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
"offenceDate": "2024-12-01",
"convictionDate": "2024-12-05",
"penaltyPoints": 9
}
],
---- End Date and Removal Date Calculation in Visn ----
Scenario 4: Endorsement End Date Calculation with Conviction Date and Sentence Date
When the driving license is disqualified, the endorsement end date and removal date is calculated based on the conviction date and the type of violation.
Driver Details:
- Driver Name: Adam Z
- Driving License Number: GZKXI603142N99HK
Penalty Code and assocuated periods
In this case, the system will consider the number of years to be added to the conviction date to calculate the end date and removal date, based on the penalty code. Below are the penalty codes and their corresponding periods.
code : "BA10" endPeriod : 3 period: 4
code : "DR10" endPeriod : 10 period: 11
Expected Outcomes:
Expected End Date: 07/02/1998 (Conviction Date + 3 years)
Expected Removal Date: 07/02/1999 (Conviction Date + 4 years)
Expected End Date: 07/02/2005 (Conviction Date + 10 years)
Expected Removal Date: 07/02/2006 (Conviction Date + 11 years)
---- DVLA Api Response ----
endorsements: [
{
"disqualification": {
"forLife": true
},
"offenceCode": "BA10",
"offenceLegalLiteral": "Driving while disqualified by order of court",
"offenceDate": "1995-01-10",
"convictionDate": "1995-02-07",
"sentenceDate": "1995-02-28"
},
{
"disqualification": {
"forLife": true
},
"offenceCode": "DR10",
"offenceLegalLiteral": "Driving or attempting to drive with alcohol level above limit",
"offenceDate": "1995-01-10",
"convictionDate": "1995-02-07",
"sentenceDate": "1995-02-28"
},
{
"disqualification": {
"forLife": true
},
"offenceCode": "BA10",
"offenceLegalLiteral": "Driving while disqualified by order of court",
"offenceDate": "1994-06-09",
"convictionDate": "1994-11-16",
"sentenceDate": "1995-02-28"
},
{
"disqualification": {
"forLife": true
},
"offenceCode": "DR10",
"offenceLegalLiteral": "Driving or attempting to drive with alcohol level above limit",
"offenceDate": "1994-06-09",
"convictionDate": "1994-11-16",
"sentenceDate": "1995-02-28"
}
],
---- End Date and Removal Date Calculation in Visn ----
Scenario 5: Penalty point update when endorsement End Date is reached
In this case, the system will update the penalty points for the driver when the endorsement end date is reached, and the updateDriverPenaltyPoints scheduler runs on that day.
Penalty Code and assocuated periods
In this case, the system will consider the number of years to be added to the Offense date to calculate the end date and removal date, based on the penalty code. Below are the penalty codes and their corresponding periods.
code : "SP30" endPeriod : 3 period: 4
code : "LC50" endPeriod : 3 period: 4
Expected Outcomes:
Expected End Date: 23/12/2026 (Offense Date + 3 years)
Expected Removal Date: 23/12/2027 (Offense Date + 4 years)
Expected End Date: 22/12/2024 (Offense Date + 3 years)
Expected Removal Date: 22/12/2025 (Offense Date + 4 years)
---- DVLA Api Response ----
endorsements: [
{
"offenceCode": "LC50",
"offenceLegalLiteral": "Causing death by dangerous driving",
"offenceDate": "2019-10-18",
"sentenceDate": "2018-10-19",
"penaltyPoints": 9
},
{
"offenceCode": "SP30",
"offenceLegalLiteral": "Causing death by dangerous driving",
"offenceDate": "2023-10-19",
"sentenceDate": "2018-10-19",
"penaltyPoints": 3
}
],
---- End Date and Removal Date Calculation in Visn ----
- Before Scheduler:
updateDriverPenaltyPoints
Run
- After Scheduler:
updateDriverPenaltyPoints
Run
Scenario 6: Endorsement End Date Calculation with mix of Conviction Date & Offense Date
In this scenario, the system calculates the endorsement end date and removal date based on a combination of the offense date and conviction date, depending on the situation.
Driver Details:
- Name: Theo D
- Driving License Number: MIXDL412082FW9CT
Penalty Code and assocuated period
In this case, the system will consider the number of years to be added to the Offense date to calculate the end date and removal date, based on the penalty code. Below are the penalty codes and their corresponding periods.
code : "IN10" endPeriod : 3 period: 4
code : "SP50" endPeriod : 3 period: 4
code : "SP30" endPeriod : 3 period: 4
Expected Outcomes:
Expected End Date: 11/04/2027 (Offense Date + 3 years)
Expected Removal Date: 11/04/2028 (Offense Date + 4 years)
Expected End Date: 14/03/2025 (Offense Date + 3 years)
Expected Removal Date: 13/03/2026 (Offense Date + 4 years)
Expected End Date: 03/01/2023 (Offense Date + 3 years)
Expected Removal Date: 03/01/2024 (Offense Date + 4 years)
---- DVLA Api Response ----
endorsements: [
{
"penaltyPoints": 6,
"offenceCode": "IN10",
"offenceLegalLiteral": "Using a vehicle uninsured against third party risks",
"offenceDate": "2024-04-11"
},
{
"penaltyPoints": 3,
"offenceCode": "SP50",
"offenceLegalLiteral": "Exceeding speed limit on a motorway",
"offenceDate": "2022-03-14"
},
{
"penaltyPoints": 3,
"offenceCode": "SP30",
"offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
"offenceDate": "2021-01-03",
"convictionDate": "2021-07-05"
}
],
---- End Date and Removal Date Calculation in Visn ----
Scenario 7: Display of identical duplicate Penalty records
This scenario involves identifying and displaying penalty records that are exact duplicates, including matching offense dates, conviction dates, sentence details, and multiple endorsement records. Even if multiple endorsement records have duplicate data, they should still be displayed if present in the response
Expected Outcomes:
It should display all the duplicate Endorsement records.
---- DVLA Api Response ----
endorsements: [
{
"offenceCode": "MS90",
"offenceLegalLiteral": "Failure to give information as to identity of driver etc.",
"offenceDate": "2023-02-10",
"convictionDate": "2023-10-19",
"sentenceDate": "2024-01-15"
},
{
"penaltyPoints": 6,
"offenceCode": "MS90",
"offenceLegalLiteral": "Failure to give information as to identity of driver etc.",
"offenceDate": "2023-02-10",
"convictionDate": "2023-10-19",
"sentenceDate": "2024-01-15"
},
{
"penaltyPoints": 6,
"offenceCode": "MS90",
"offenceLegalLiteral": "Failure to give information as to identity of driver etc.",
"offenceDate": "2023-02-10",
"convictionDate": "2023-10-19",
"sentenceDate": "2024-01-15"
},
{
"penaltyPoints": 6,
"offenceCode": "MS90",
"offenceLegalLiteral": "Failure to give information as to identity of driver etc.",
"offenceDate": "2023-02-10",
"convictionDate": "2023-10-19",
"sentenceDate": "2024-01-15"
},
{
"penaltyPoints": 6,
"offenceCode": "MS90",
"offenceLegalLiteral": "Failure to give information as to identity of driver etc.",
"offenceDate": "2023-02-10",
"convictionDate": "2023-10-19",
"sentenceDate": "2024-01-15"
},
{
"penaltyPoints": 4,
"offenceCode": "SP30",
"offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
"offenceDate": "2022-12-04",
"convictionDate": "2023-06-22",
"sentenceDate": "2024-01-15"
},
{
"penaltyPoints": 6,
"offenceCode": "MS90",
"offenceLegalLiteral": "Failure to give information as to identity of driver etc.",
"offenceDate": "2022-11-04",
"convictionDate": "2023-09-08",
"sentenceDate": "2024-01-15"
},
{
"penaltyPoints": 8,
"offenceCode": "IN10",
"offenceLegalLiteral": "Using a vehicle uninsured against third party risks",
"offenceDate": "2022-04-02",
"convictionDate": "2023-09-14",
"sentenceDate": "2024-01-15"
},
{
"penaltyPoints": 8,
"offenceCode": "IN10",
"offenceLegalLiteral": "Using a vehicle uninsured against third party risks",
"offenceDate": "2021-08-15",
"convictionDate": "2023-04-12"
},
{
"disqualification": { "months": 18 },
"offenceCode": "TT99",
"offenceLegalLiteral": "To signify a disqualification under 'totting up' procedure. If the total penalty points reach 12 or more within 3 years, the driver is liable to be disqualified",
"convictionDate": "2023-10-19",
"sentenceDate": "2024-01-15"
}
],
"totalNoOfPenaltyPoints": 50
---- End Date and Removal Date Calculation in Visn ----
- After Scheduler:
updateDriverPenaltyPoints
Run